package com.mikgonz.farkle.ui;

import android.content.Intent;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;

import com.mikgonz.farkle.R;

public class Options extends PreferenceActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.options_prefs);

		Preference p = findPreference("scorePrefs");

		p.setOnPreferenceClickListener(new OnPreferenceClickListener() {

			@Override
			public boolean onPreferenceClick(Preference preference) {
				startActivity(new Intent(Options.this, ScoringOptions.class));
				return true;
			}

		});

		p = findPreference("notificationsPref");

		p.setOnPreferenceClickListener(new OnPreferenceClickListener() {

			@Override
			public boolean onPreferenceClick(Preference preference) {
				startActivity(new Intent(Options.this,com.xtify.android.sdk.SettingsActivity.class));
				return true;
			}

		});
		
		p = findPreference("onlineAccountPref");

		p.setOnPreferenceClickListener(new OnPreferenceClickListener() {

			@Override
			public boolean onPreferenceClick(Preference preference) {
				startActivity(new Intent(Options.this,OnlineAccount.class));
				return true;
			}

		});
	}

}
